package com.t5;

import com.jdk18.jdk8new.Apple;

/**
 * Created by xuyiwei on 2018/7/14.
 */
class Person{
    public void function1() {
        //三种调用方式
        Person main=new Person();
        main.function2();

        function2();

        this.function2();
    }

    public void function2(){
        System.out.println(this+"     我是第二个方法");
    }

    public Person() {
        System.out.println(this+"     新建一个personlei");
    }
}
public class PassingThis {
    public static void main(String[] args) {
        Person person = new Person();
        person.function1();
    }
}
